        <!-- BOX DIREITO -->
        <td colspan="2" valign="top" style="border-left:1px solid #bbb; border-right:1px solid #ccc; padding:20px 12px;">
            <div id="titulo_pagina">Contas a <?php echo $titulo; ?> (<?php echo $status_titulo;?>)</div>
            <p>Manuten&ccedil;&atilde;o das Contas a <?php echo $titulo; ?> (<?php echo $status_titulo;?>).</p>
   			<script type="text/javascript">
   				<?php
   				//Variaveis para configuracao da GRID
   				//$gridName - ID da GRID
   				//$controller - Controlador da GRID
   				//$titleList - Titulo da GRID
   				//$titleForm - Titulo do Formulario
   				$gridName = "gridContas";
   				$controller = "financeiro";
   				$titleList = "Lista de Contas a ".$titulo." (".$status_titulo.")";
   				$titleForm = "Formul&aacute;rio de Contas a ".$titulo." (".$status_titulo.")";
   				?>
				var arr_fields = [
				                  {nome:'id_conta_financeiro',label:'Id', tp_obj: 'hid', tipo : 'str', grid:{name:'id_conta_financeiro',index:'id_conta_financeiro', width:15, key:true, hidden:true, def_order:true,order:'asc'}},
				                  {nome:'id_centro_custo_fk',label:'Centro de Custo', tp_obj: 'sel', tipo : 'str', grid:{name:'id_centro_custo_fk',index:'id_centro_custo_fk', width:80, def_order:false,order:''}},
				                  {nome:'id_despesa_fk',label:'Despesa', tp_obj: 'sel', tipo : 'str', grid:{name:'id_despesa_fk',index:'id_despesa_fk', hidden:true, width:15, def_order:false,order:''}},
				                  {nome:'id_portador_fk',label:'Portador', tp_obj: 'sel', tipo : 'str', grid:{name:'id_portador_fk',index:'id_portador_fk', hidden:true, width:15, def_order:false,order:''}},
				                  {nome:'id_banco_fk',label:'Banco', tp_obj: 'sel', tipo : 'str', grid:{name:'id_banco_fk',index:'id_banco_fk', width:15, hidden:true, def_order:false,order:''}},
				                  {nome:'id_empresa_fk',label:'Empresa', tp_obj: 'sel', tipo : 'int', grid:{name:'id_empresa_fk',index:'id_empresa_fk', width:15, def_order:false,order:''}},
				                  {nome:'id_funcionario_fk',label:'Lan&ccedil;aco por:', tp_obj: 'hid', tipo : 'str', grid:{name:'id_funcionario_fk',index:'id_funcionario_fk', hidden:true, width:15, def_order:false,order:''}},
				                  {nome:'descricao',label:'Descri&ccedil;&atilde;o', tp_obj: 'txt', tipo : 'str', grid:{name:'descricao',index:'descricao', width:170, def_order:false,order:''}},
				                  {nome:'numero_cheque',label:'N&deg; Cheque', tp_obj: 'txt', tipo : 'str', grid:{name:'numero_cheque',index:'numero_cheque', width:170, hidden:true, def_order:false,order:''}},
				                  {nome:'nosso_numero',label:'Nosso N&deg;', tp_obj: 'txt', tipo : 'str', grid:{name:'nosso_numero',index:'nosso_numero', width:170, hidden:true, def_order:false,order:''}},
				                  {nome:'data_emissao',label:'Dt. Emiss&atilde;o', tp_obj: 'txt', tipo : 'str', grid:{name:'data_emissao',index:'data_emissao', width:80, def_order:false, order:'', formatter:'date'}},
				                  {nome:'data_vencimento',label:'Dt. Vencimento', tp_obj: 'txt', tipo : 'str', grid:{name:'data_vencimento',index:'data_vencimento', width:80, def_order:false, order:'', formatter:'date'}},
				                  {nome:'numero_parcela',label:'N&deg; Parcela', tp_obj: 'txt', tipo : 'str', grid:{name:'numero_parcela',index:'numero_parcela', width:80, def_order:false,order:''}},
				                  {nome:'valor',label:'Valor (R$)', tp_obj: 'txt', tipo : 'str', grid:{name:'valor',index:'valor', width:60, def_order:false, summaryType:'sum',order:'',formatter:'currency',formatoptions:{prefix:"R$"}}},
				                  {nome:'desconto',label:'Desconto (%)', tp_obj: 'txt', tipo : 'str', grid:{name:'desconto',index:'desconto', width:80, def_order:false,order:''}},
				                  {nome:'valor_pago',label:'Valor Pago (R$)', tp_obj: 'txt', tipo : 'str', grid:{name:'valor_pago',index:'valor_pago', width:170, hidden:true, def_order:false,order:'',formatter:'currency', formatoptions:{prefix:"R$"}}},
				                  {nome:'data_pagamento',label:'Dt. Pagamento', tp_obj: 'txt', tipo : 'str', grid:{name:'data_pagamento',index:'data_pagamento', hidden:true, width:170, def_order:false, order:'', formatter:'date'}},
				                  {nome:'observacao',label:'Observa&ccedil;&atilde;o', tp_obj: 'txt', tipo : 'str', grid:{name:'observacao',index:'observacao', hidden:true, width:170, def_order:false,order:''}},
				                  {nome:'flag_tipo',label:'Tipo', tp_obj: 'hid', tipo : 'str', grid:{name:'flag_tipo',index:'flag_tipo', width:60, def_order:false,order:'', hidden:true, formatter:format_tipo_conta}},
				                  {nome:'flag_status',label:'Status', tp_obj: 'sel', tipo : 'str', grid:{name:'flag_status',index:'flag_status', width:60, def_order:false, hidden:true, order:'', formatter:format_status_conta}},
				                  {nome:'hid_oper',label:'', tp_obj: 'hid', tipo : 'str', grid:null}
					              	];

				//Variavel com o codigo da linha selecionada
				var editValue = null;
				$(document).ready(function(){
					var arr_fld_grid = new Array();
					var arr_fld_labels = new Array();
					var fld_sort_name = "";
					var fld_sort_order = "";

					//Monta os arrays com os labels e os campos
					for(i=0; i<arr_fields.length; i++)
					{
						if(arr_fields[i].grid != null)
						{
							arr_fld_grid.push(arr_fields[i].grid);
							arr_fld_labels.push(arr_fields[i].label);
							if(arr_fields[i].grid.def_order)
							{
								fld_sort_name = arr_fields[i].grid.name;
								fld_sort_order = arr_fields[i].grid.order;
							}
						}
					}

					//Montagem da GRID
					jQuery("#<?php echo $gridName; ?>").jqGrid({
					   	url:'<?php echo base_url().$controller."/listContas/?tipo=".$tipo."&status=".$status;?>',
						datatype: "json",
					   	colNames:arr_fld_labels,
					   	colModel:arr_fld_grid,
					   	rowNum:10,
					   	rowList:[5,10,20,30],
					   	height: 'auto',
					   	width:'960',
					   	pager: '#p<?php echo $gridName; ?>',
					   	sortname: fld_sort_name,
					    viewrecords: true,
					    sortorder: fld_sort_order,
					    caption:'<?php echo $titleList; ?>',
					    onSelectRow: function(id){ 
							if(id && id!==editValue){ 
								editValue=id; 
							} 
						},
						grouping:true,
					   	groupingView : {
					   		groupField : ['id_empresa_fk'],
					   		groupColumnShow : [false],
					   		groupSummary : [true],
					   		groupText : ['<b>Empresa: {0}</b>']
					   	}
					})
					.navGrid('#p<?php echo $gridName; ?>',{edit:false,add:false,del:false,search:false,refresh:false},{},{},{})
				});

				//Validacao e envio do formulario
				$(function() {

					var id_empresa_fk = $("#id_empresa_fk"),
						id_centro_custo_fk = $("#id_centro_custo_fk"),
						id_despesa_fk = $("#id_despesa_fk"),
						id_portador_fk = $("#id_portador_fk"),
						id_banco_fk = $("#id_banco_fk"),
						descricao = $("#descricao"),
						numero_cheque = $("#numero_cheque"),
						nosso_numero = $("#nosso_numero"),
						data_emissao = $("#data_emissao"),
						data_vencimento = $("#data_vencimento"),
						numero_parcela = $("#numero_parcela"),
						valor = $("#valor"),
						desconto = $("#desconto"),
						valor_pago = $("#valor_pago"),
						data_pagamento = $("#data_pagamento"),
						observacao = $("#observacao"),
						flag_tipo = $("#flag_tipo"),
						flag_status = $("#flag_status"),
					allFields = $([])
									.add(id_empresa_fk)
            						.add(id_centro_custo_fk)
            						.add(id_despesa_fk)
            						.add(id_portador_fk)
            						.add(id_banco_fk)
            						.add(descricao)
            						.add(numero_cheque)
            						.add(nosso_numero)
            						.add(data_emissao)
            						.add(data_vencimento)
            						.add(numero_parcela)
            						.add(valor)
            						.add(desconto)
            						.add(valor_pago)
            						.add(data_pagamento)
            						.add(observacao)
            						.add(flag_tipo)
            						.add(flag_status),
					tips = $(".validateTips");
	    			
				    $("#dialog-form").dialog({
					    bgiframe: true,
					    autoOpen: false,
					    height: 600,
					    width: 600,
					    modal: true,
					    buttons: {
						    'Cancelar': function() {
							    $(this).dialog('close');
					    		fc_reset_form(arr_fields);
						    }, 
						    'Salvar': function()
						    {
		                        var id_centro_custo_fk = $("#id_centro_custo_fk");
							    allFields.add(id_centro_custo_fk);
		                        var id_despesa_fk = $("#id_despesa_fk");
							    allFields.add(id_despesa_fk);

								var bValid = true;
								allFields.removeClass('ui-state-error');

								//bValid = bValid && validation(descricao, "Descri\u00e7\u00e3o", "required", tips, 0, 0);
								//bValid = bValid && validation(descricao, "Descri\u00e7\u00e3o", "length", tips, 1, 250);

								if(bValid)
								{
						            $('#dialog-wait').dialog({ 
						            	closeOnEscape: false,
						            	draggable: false,
						            	modal: true,
						            	resizable: false  
						            });
									eval(fc_get_fields(arr_fields));
									$.ajax({
										  type: 'POST',
										  url: '<?php echo base_url().$controller."/save"?>',
										  data: arr_data,
										  success: function(msg){
										  		var type = msg.substr(0,3);
												var msgs = msg.substr(4);
										  		if(type != "err")
										  		{
													showMsg(msgs);
													$("#<?php echo $gridName; ?>").trigger("reloadGrid");
													editValue = null;
										    		fc_reset_form(arr_fields);
													allFields.val('').removeClass('ui-state-error');
										  			document.getElementById('error').innerHTML= "";
										  			document.getElementById("error").style.display='none';
										  			tips.removeClass('ui-state-highlight', 1500);
													$("#dialog-form").dialog('close');
										  		}
										  		else
										  		{
										  			document.getElementById('error').innerHTML= msgs;
										  			document.getElementById("error").style.display="";
											  	}
											}
									});
									$('#dialog-wait').dialog('close');
								}
							}
					    },
					    open: function() {
			                $('.ui-dialog-buttonpane').
			                    find('button:contains("Cancelar")').button({
			                    icons: {
			                        primary: 'cancelIcon'
			                    }
			                });
			                $('.ui-dialog-buttonpane').
		                    find('button:contains("Salvar")').button({
		                    icons: {
		                        primary: 'saveIcon'
		                    }
		                });
			             },
					    close: function() {				
					    }
				    });
				});		
			</script>
			<script>
				$(document).ready(function() {
		            $("#bt_add").button({
			            icons: {primary: "addIcon"}
		            }).click(function(){
						$('#dialog-form').dialog('option', 'title');
			            $('#dialog-form').dialog('open');
						$('#hid_oper').val("add");
		    		});

		            $("#bt_edit").button({
			            icons: {primary: "editIcon"}
		            }).click(function(){
					   if(editValue != null)
					   {
							$('#dialog-form').dialog('open');
				            $('#dialog-wait').dialog({ 
					            	closeOnEscape: false,
					            	draggable: false,
					            	modal: true,
					            	resizable: false  
					            });
							$.ajax({
		                        type: "POST",
		                        url: '<?php echo base_url().$controller."/getById"?>',
		                        data: {id:editValue},
		                        success: function(msg) 
		                        {
									var obj = msg;
									fc_edit(arr_fields, obj);	
									$('#hid_oper').val("upd");
									eval('var edi = '+obj);
									var natureza = edi.rows[0].relations[0];
									var operacao = edi.rows[0].relations[1];
									if(natureza != "" && natureza != "undefined")
									{
										$("#id_natureza_fk").val(natureza);
										carregaCentroCusto(natureza,msg);
									}

									if(operacao != "" && operacao != "undefined")
									{
										$("#id_operacao_fk").val(operacao);
										carregaDespesa(operacao,msg);
									}
		                        }
							});
							$('#dialog-wait').dialog('close');
					   }
					   else
					   {
						   dialogMessage('Selecione uma linha','dialog-message');   
							$("#<?php echo $gridName; ?>").trigger("reloadGrid");
					   }
					});

		            $("#bt_delete").button({
			            icons: {primary: "deleteIcon"}
		            }).click(function(){
		            	if(editValue != null)
					   	{
				   			$("#dialog-confirm").dialog({
				   				resizable: false,
				   				height:150,
				   				width:400,
				   				modal: true,
				   				buttons: {
				   					'Confirmar': function() {
        					            $('#dialog-wait').dialog({ 
        					            	closeOnEscape: false,
        					            	draggable: false,
        					            	modal: true,
        					            	resizable: false  
        					            });
										$.ajax({
				                    		type: "POST",
				                    		url: '<?php echo base_url().$controller."/delete"?>',
				                    		data: {id:editValue},
				                    		success: function(msg) 
				                    		{
										  		var type = msg.substr(0,3);
												var msgs = msg.substr(4);

												if(type != "err")
												{
						   							showMsg(msgs);
												}
												else
												{
													dialogMessage(msgs,'dialog-message');   
												}
						       					$("#<?php echo $gridName; ?>").trigger("reloadGrid");
						       					editValue = null;
				                    		}
										});
										$('#dialog-wait').dialog('close');
				   						$(this).dialog('close');
				   					},
				   					Cancelar: function() {
				   						$(this).dialog('close');
				   					}
				   				}
				   			}); 
					   	}
				   		else
				   		{
							   dialogMessage('Selecione uma linha','dialog-message');   
								$("#<?php echo $gridName; ?>").trigger("reloadGrid");
					   	}
					});

		            $("#bt_search").button({
			            icons: {primary: "searchIcon"}
		            }).click(function(){
						jQuery("#<?php echo $gridName; ?>").jqGrid('searchGrid',{multipleSearch:true});
		    		});

		            $("#bt_refresh").button({
			            icons: {primary: "refreshIcon"}
		            }).click(function(){
		            	$("#<?php echo $gridName; ?>").trigger("reloadGrid");
		    		});
		            
				});	    

				$(function() {
					$.datepicker.setDefaults( $.datepicker.regional[ "pt-BR" ] );
					$("#data_emissao").datepicker();
					$("#data_vencimento").datepicker();
					$("#data_pagamento").datepicker();
				});	

				function carregaCentroCusto(natureza, msg)
				{
					$("#div_centrocusto").html("<img src='<?= base_url() ?>images/loading.gif' /><h4>Carregando...</h4>");
					$.ajax({
		                    type: "POST",
		                    url: "<?= base_url().$controller; ?>/listCentrosCustos",
		                    data: "natureza=" + natureza,
		                    success: function(lista_centrocusto) 
		                    {
		                    	$("#div_centrocusto").html(lista_centrocusto);

		    					if(msg != "")
		    					{
		    						eval("var edi = "+msg);
		    						var cc = edi.rows[0].cell[1];
		    						$("#id_centro_custo_fk").val(cc);
		    					}	                  				
			                }
		            });	 
				}
		
				function carregaDespesa(operacao, msg)
				{
					$("#div_despesa").html("<img src='<?= base_url() ?>images/loading.gif' /><h4>Carregando...</h4>");
					$.ajax({
		                    type: "POST",
		                    url: "<?= base_url().$controller; ?>/listDespesas",
		                    data: "operacao=" + operacao,
		                    success: function(lista_despesa) 
		                    {
		                    	$("#div_despesa").html(lista_despesa);

		    					if(msg != "")
		    					{
		    						eval("var edi = "+msg);
		    						var dp = edi.rows[0].cell[2];
		    						$("#id_despesa_fk").val(dp);
		    					}	                  				
			                }
		            });	 
				}
							
    		</script> 
			<style>
            	#toolbar {
            		padding: 2px 4px;
					width:950px;
            	}
        	</style>
			<div align="center">
                <div id="toolbar" class="ui-widget-header ui-corner-all">
                	<table border="0" cellpadding="0" cellspacing="0" width="100%">
                		<tr>
                			<td align="left" width="33%">
            				<?php 
            					$actions = $this->session->userdata('v_actions');
            					
            					if(in_array("ADD", $actions[$controller."/".$tipo."/".$status]))
            					{
            					?>
            	                <button id="bt_add">Novo</button>
            	                <?php 
            					}
            					
            					if(in_array("UPD", $actions[$controller."/".$tipo."/".$status]))
            					{
            	                ?>
                            	<button id="bt_edit">Editar</button>
            	                <?php 
            					}
            					
            					if(in_array("DEL", $actions[$controller."/".$tipo."/".$status]))
            					{
            	                ?>
                            	<button id="bt_delete">Deletar</button>
                            	<?php 
            					}
                            	?>
                			</td>
                			<td align="center" width="34%">
            	                <?php 
            					if(in_array("PES", $actions[$controller."/".$tipo."/".$status]))
            					{
            	                ?>
                            	<button id="bt_search">Pesquisar</button>
            	                <?php 
            					}
            					
            					if(in_array("REF", $actions[$controller."/".$tipo."/".$status]))
            					{
            	                ?>
                            	<button id="bt_refresh">Recarregar</button>
                            	<?php 
            					}
                            	?>
                			</td>
                			<td align="right" width="33%">
                				&nbsp;
                			</td>
                		</tr>
                	</table>
                </div>
				<table id="<?php echo $gridName; ?>"></table>
				<div id="p<?php echo $gridName; ?>"></div>
			</div>
			<div id="dialog-form" title="<?php echo $titleForm; ?>">
				<div id="error" class="ui-state-highlight" style="display:none;"></div>
				<p class="validateTips">Os campos com * s&atilde;o obrigat&oacute;rios.</p>
				<fieldset>
					<form>
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td>
									<table border="0" cellpadding="0" cellspacing="0" width="550">
										<tr>
											<td width="100px">
            									<label for="id_natureza_fk">Natureza</label>
            									<br />
            									<select name="id_natureza_fk" id="id_natureza_fk" class="select ui-widget-content ui-corner-all" onchange="carregaCentroCusto(this.value,'');">
            										<option value="0" selected></option>
                            	                <?php 
            									foreach ($naturezas as $dados) 
            									{
            									?>
            										<option value="<?php echo $dados->id_natureza; ?>"><?php echo utf8_decode($dados->descricao); ?></option>
            									<?php
            									}
            									?>
            									</select>
											</td>
											<td width="5px">&nbsp;</td>
											<td width="295px">
            									<label for="id_centro_custo_fk">Centro de Custo</label>
            									<br />
            									<div id="div_centrocusto">
                									<select name="id_centro_custo_fk" id="id_centro_custo_fk" class="select ui-widget-content ui-corner-all">
                										<option value="0"></option>
                									</select>
            									</div>
											</td>
										</tr>
            							<tr height="3px">
            								<td colspan="3">&nbsp;</td>
            							</tr>
										<tr>
											<td>
            									<label for="id_operacao_fk">Opera&ccedil;&atilde;o</label>
            									<br />
            									<select name="id_operacao_fk" id="id_operacao_fk" class="select ui-widget-content ui-corner-all" onchange="carregaDespesa(this.value,'');">
            										<option value="0" selected></option>
                            	                <?php 
            									foreach ($operacoes as $dados) 
            									{
            									?>
            										<option value="<?php echo $dados->id_operacao; ?>"><?php echo utf8_decode($dados->descricao); ?></option>
            									<?php
            									}
            									?>
            									</select>
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="id_despesa_fk">Despesa</label>
            									<br />
            									<div id="div_despesa">
                									<select name="id_despesa_fk" id="id_despesa_fk" class="select ui-widget-content ui-corner-all">
                										<option value="0"></option>
                									</select>
            									</div>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr height="3px">
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td>
            									<label for="id_portador_fk">Portador</label>
            									<br />
            									<select name="id_portador_fk" id="id_portador_fk" class="select ui-widget-content ui-corner-all">
            										<option value="0"></option>
                            	                <?php 
            									foreach ($portadores as $dados) 
            									{
            									?>
            										<option value="<?php echo $dados->id_portador; ?>"><?php echo utf8_decode($dados->descricao); ?></option>
            									<?php
            									}
            									?>
            									</select>
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="id_banco_fk">Banco</label>
            									<br />
            									<select name="id_banco_fk" id="id_banco_fk" class="select ui-widget-content ui-corner-all">
            										<option value="0"></option>
            									<?php 
            									foreach ($bancos as $dados) 
            									{
            									?>
            										<option value="<?php echo $dados->id_banco; ?>"><?php echo utf8_decode($dados->nome)." - Ag.: ". $dados->num_agencia." / C.C.: ".$dados->num_conta; ?></option>
            									<?php
            									}
            									?>
            									</select>
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="flag_status">Status da Conta</label><br />
            									<select name="flag_status" id="flag_status" class="select ui-widget-content ui-corner-all">
            										<option value="A">Aberta</option>
            										<option value="P">Paga</option>
            									</select>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr height="3px">
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td>
            									<label for="id_empresa_fk">Empresa *</label>
            									<br />
            									<select name="id_empresa_fk" id="id_empresa_fk" class="select ui-widget-content ui-corner-all">
            										<option value=""></option>
            									<?php 
            									foreach ($empresas as $dados) 
            									{
            									?>
            										<option value="<?php echo $dados->id_empresa;?>"><?php echo utf8_decode($dados->nome_fantasia);?></option>
            									<?php
            									}
            									?>
            									</select>
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="descricao">Descri&ccedil;&atilde;o *</label>
            									<br />
            									<input type="text" name="descricao" id="descricao" class="text ui-widget-content ui-corner-all" size="48" />
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr height="3px">
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td>
            									<label for="numero_cheque">N&deg; Cheque</label>
            									<br />
            									<input type="text" name="numero_cheque" id="numero_cheque" class="text ui-widget-content ui-corner-all" size="15" />
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="nosso_numero">Nosso N&deg;</label>
            									<br />
            									<input type="text" name="nosso_numero" id="nosso_numero" class="text ui-widget-content ui-corner-all" size="15" />
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="data_emissao">Dt. Emiss&atilde;o *</label>
            									<br />
            									<input type="text" name="data_emissao" id="data_emissao" class="text ui-widget-content ui-corner-all" size="16" />
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="data_vencimento">Dt. Vencimento *</label>
            									<br />
            									<input type="text" name="data_vencimento" id="data_vencimento" class="text ui-widget-content ui-corner-all" size="16" />
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr height="3px">
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td>
									<table border="0" cellpadding="0" cellspacing="0" width="100%">
										<tr>
											<td>
            									<label for="numero_parcela">N&deg; Parcela</label>
            									<br />
            									<input type="text" name="numero_parcela" id="numero_parcela" class="text ui-widget-content ui-corner-all" size="15" />
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="valor">Valor *</label>
            									<br />
            									<input type="text" alt="decimal" name="valor" id="valor" class="text ui-widget-content ui-corner-all" size="10" />
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="desconto">Desconto</label>
            									<br />
            									<input alt="decimal" type="text" name="desconto" id="desconto" class="text ui-widget-content ui-corner-all" size="10" />
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="valor_pago">Valor Pago</label>
            									<br />
            									<input alt="decimal" type="text" name="valor_pago" id="valor_pago" class="text ui-widget-content ui-corner-all" size="10" />
											</td>
											<td>&nbsp;</td>
											<td>
            									<label for="data_pagamento">Dt. Pagamento</label>
            									<br />
            									<input type="text" name="data_pagamento" id="data_pagamento" class="text ui-widget-content ui-corner-all" size="15" />
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr height="3px">
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td>
									<label for="observacao">Observa&ccedil;&atilde;o</label>
									<br />
									<textarea name="observacao" id="observacao" class="textarea ui-widget-content ui-corner-all" rows="3" cols="78"></textarea>
								</td>
							</tr>
						</table>
						<?php 
						$idUsuario = $this->session->userdata('v_id_usuario');
						?>
    					<input type="hidden" id="hid_oper" value="" />
    					<input type="hidden" id="flag_tipo" value="<?php echo $tipo; ?>" />
						<input type="hidden" id="id_conta_financeiro" value="" />
    				</form>
				</fieldset>
			</div>
        </td>
        <!-- X BOX DIREITO -->